Repository navigation
feat: TLS pairing with confirmation, a sandboxed Claude Code route and skill name checks - #16
Merged
Merged
Conversation
… own revocable token The devices listener now runs on https with a self-signed certificate made once per install (key kept 0600 in the data folder). The pairing link carries the certificate's SHA-256 fingerprint and pairing refuses a link for any other certificate. Each pairing spends a one-time code and issues a token for that device alone, stored as a hash; devices.list and devices.revoke list and unpair devices, and unpairing closes the device's open connections. A plain http request to the listener gets no answer.
…print in Settings Settings, Other devices shows the listener certificate's SHA-256 fingerprint under the pairing code and a keyed list of paired devices, each with Unpair. The window repaints the section on devices.changed, so a spent code is replaced on screen after a device pairs.
…d keep pairing window-only A scan of the pairing code now opens a waiting page on the device and a request in Settings, Other devices, with the device's name, a check number and the certificate fingerprint; the device token is issued only after Allow in FormAT's window. Pairing codes and waiting requests run out after five minutes. devices.start, devices.revoke, devices.forget and the new devices.answer run only from the window on this computer, and devices.status returns no pairing link, QR code or waiting devices to a paired device or an agent. A paired request re-checks its token once the revocation watch is registered.
…one lock A device allowed in the window gets its token in the same step that takes its request out of the table, and devices.forget drops waiting requests and unpairs every device in one step under the same lock, so forgetting devices while an allowed device collects its token leaves it unpaired.
… skill of the same name Claude Code route: each reply passes a settings file FormAT writes for that launch (--settings, with --setting-sources user so settings in the chat folder are not read). It turns Claude Code's sandbox on where it can run (macOS; Linux and WSL 2 with bubblewrap and socat), limits writes to the chat's folder and network to the host names in the new claudeCodeDomains setting, ignores the unsandboxed escape, and disables bypass permissions mode. A launch carrying a bypass flag or mode is refused. Where the sandbox is not available the reply still runs and Settings, Tools, Sandbox says its commands are not sandboxed. Skills: adding, writing or installing a skill whose name is taken is refused with 409 and data.clash unless overwrite is true or a new name is given; the window asks Overwrite, Keep both or Cancel. Claude's save_skill needs an explicit overwrite, and a plugin is not added when it would replace a skill it did not bring. New command skill.clash.
…dboxed commands off FormAT's data folder The launch settings deny Claude Code's Edit rules on the uploads and skills folders on every platform (Windows paths in the //c/ form), hide FormAT's data folder from sandboxed commands apart from the chat folder, uploads and skills, and refuse bypass flags also when spelled --flag=value.
…nd key file The paths hidden from Claude Code now match FormAT's own sandbox: the home folder, the resolved data folder and the backend .env (or the backend folder when there is none). Besides the sandbox's denyRead, each becomes Read and Edit deny rules for Claude Code's file tools on every platform, also when the sandbox is unavailable. Since deny rules win over allow rules, each hidden folder is denied entry by entry beside the path to the chat folder, uploads and skills, which are then allowed for reading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests
How to ship